package com.fourpigeon.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

import com.fourpigeon.service.RedisService;

@Service
public class RedisServiceImpl implements RedisService{
    @Autowired
    private StringRedisTemplate stringRedisTemplate;

    @Override
    public void get(Long id) {
        String key = "user:"+id;
        String string = stringRedisTemplate.opsForValue().get(key);
        System.out.println(string);
    }

    @Override
    public void set(Long id, String value) {
        String key = "user:"+id;
        stringRedisTemplate.opsForValue().set(key, value);
    }
    
}
